from django.urls import path
from .views import *
from rest_framework_jwt.views import obtain_jwt_token


urlpatterns = [
    # register
    path("register/", Register.as_view()),

    # 二维码
    path("barCode/", BarCode.as_view()),

    # 收集用户的手机号
    path("phone", CollectPhone.as_view()),

    # GenericAPIView 及混入的使用
    #path("GenericAPIView/", UserView1.as_view()),
    #path("GenericAPIView/<int:uid>/", UserView2.as_view()),
    # 视图集 的两个路由，需要自己配 或者自动生成
    # path("", UserViewSet.as_view({"get":"list", 'post':'create'})),
    # path("user/<int:pk>/", UserViewSet.as_view({"get":"retrieve", "put":"update", 'delete':"destroy"})),

    # 执行自定义的action
    path("ViewSetMixin/", UserViewSetMixin.as_view({"get":"my_func", "post":"my_func"})),

    # /v1/users/auth/
    path("auth/", LoginAPIView.as_view()),
    path("checkUser/", CheckUserAPIView.as_view({"get":"myget"})),

    #rest_framework_jwt  登录
    path("login/", obtain_jwt_token),

    # /users/sms_code/
    path("sms_code/", SmsCodeView.as_view()),

    # 登录的接口
    path("logincount/", LoginCountView.as_view()),

    # 统计用户总数
    path("total_count/", UserCountView.as_view()),
    # 统计日增用户总数
    path("day_increment/", DailyAddUserView.as_view()),
    # 统计日活跃用户
    path("day_live/", DailyActiveUserView.as_view()),
]

